﻿#pragma once
#include <QMap>
#include "ComponentBase.h"
#include "boxline.h"

class BoxlineManager : public ComponentBase
{
	Q_OBJECT
public:
	BoxlineManager(QObject *parent);
	~BoxlineManager();

	Boxline* GetBoxlineByID(const QString& id);

	// 组件初始化处理函数
	virtual int ComponentInit() override;
	/*自检接口*/
	virtual bool ComponentCheckSelfState() override;
	/*复位接口*/
	virtual bool ComponentSelfReset() override;

	virtual void* GetPoint(const QString& id) override;

private:
	int OnSkuArrive(const QByteArray& data);
	int OnBoxlineState(const QByteArray& data);

private:
	QMap<QString, Boxline*> m_lineList;
};
